home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / Script.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  38.1 KB  |  1,154 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Script.a
  3. ;
  4. ;    Contains:    Script Manager interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__SCRIPT__') = 'UNDEFINED' THEN
  21. __SCRIPT__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__INTLRESOURCES__') = 'UNDEFINED' THEN
  36.     include 'IntlResources.a'
  37.     ENDIF
  38.  
  39.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  40.     include 'Events.a'
  41.     ENDIF
  42. ;        include 'OSUtils.a'                                        ;
  43. ;            include 'Memory.a'                                        ;
  44.  
  45. ; Script System constants 
  46. smSystemScript                    EQU        -1                    ;designates system script.
  47. smCurrentScript                    EQU        -2                    ;designates current font script.
  48. smAllScripts                    EQU        -3                    ;designates any script    
  49. smRoman                            EQU        0                    ;Roman
  50. smJapanese                        EQU        1                    ;Japanese
  51. smTradChinese                    EQU        2                    ;Traditional Chinese
  52. smKorean                        EQU        3                    ;Korean
  53. smArabic                        EQU        4                    ;Arabic
  54. smHebrew                        EQU        5                    ;Hebrew
  55. smGreek                            EQU        6                    ;Greek
  56. smCyrillic                        EQU        7                    ;Cyrillic
  57. smRSymbol                        EQU        8                    ;Right-left symbol
  58. smDevanagari                    EQU        9                    ;Devanagari
  59. smGurmukhi                        EQU        10                    ;Gurmukhi
  60. smGujarati                        EQU        11                    ;Gujarati
  61. smOriya                            EQU        12                    ;Oriya
  62. smBengali                        EQU        13                    ;Bengali
  63. smTamil                            EQU        14                    ;Tamil
  64. smTelugu                        EQU        15                    ;Telugu
  65. smKannada                        EQU        16                    ;Kannada/Kanarese
  66. smMalayalam                        EQU        17                    ;Malayalam
  67.  
  68. smSinhalese                        EQU        18                    ;Sinhalese
  69. smBurmese                        EQU        19                    ;Burmese
  70. smKhmer                            EQU        20                    ;Khmer/Cambodian
  71. smThai                            EQU        21                    ;Thai
  72. smLaotian                        EQU        22                    ;Laotian
  73. smGeorgian                        EQU        23                    ;Georgian
  74. smArmenian                        EQU        24                    ;Armenian
  75. smSimpChinese                    EQU        25                    ;Simplified Chinese
  76. smTibetan                        EQU        26                    ;Tibetan
  77. smMongolian                        EQU        27                    ;Mongolian
  78. smGeez                            EQU        28                    ;Geez/Ethiopic
  79. smEthiopic                        EQU        28                    ;Synonym for smGeez
  80. smEastEurRoman                    EQU        29                    ;Synonym for smSlavic
  81. smVietnamese                    EQU        30                    ;Vietnamese
  82. smExtArabic                        EQU        31                    ;extended Arabic
  83. smUninterp                        EQU        32                    ;uninterpreted symbols, e.g. palette symbols
  84. smKlingon                        EQU        32                    ;Klingon
  85. ;Obsolete names for script systems (kept for backward compatibility)
  86. smChinese                        EQU        2                    ;(use smTradChinese or smSimpChinese)
  87. smRussian                        EQU        7                    ;(old name for smCyrillic)
  88. ; smMaldivian = 25;         (no more smMaldivian!)
  89. smAmharic                        EQU        28                    ;(old name for smGeez)
  90. smSlavic                        EQU        29                    ;(old name for smEastEurRoman)
  91.  
  92. smSindhi                        EQU        31                    ;(old name for smExtArabic)
  93. ; Language Codes 
  94. langEnglish                        EQU        0                    ; smRoman script 
  95. langFrench                        EQU        1                    ; smRoman script 
  96. langGerman                        EQU        2                    ; smRoman script 
  97. langItalian                        EQU        3                    ; smRoman script 
  98. langDutch                        EQU        4                    ; smRoman script 
  99. langSwedish                        EQU        5                    ; smRoman script 
  100. langSpanish                        EQU        6                    ; smRoman script 
  101. langDanish                        EQU        7                    ; smRoman script 
  102. langPortuguese                    EQU        8                    ; smRoman script 
  103. langNorwegian                    EQU        9                    ; smRoman script 
  104. langHebrew                        EQU        10                    ; smHebrew script 
  105. langJapanese                    EQU        11                    ; smJapanese script 
  106. langArabic                        EQU        12                    ; smArabic script 
  107. langFinnish                        EQU        13                    ; smRoman script 
  108. langGreek                        EQU        14                    ; smGreek script 
  109. langIcelandic                    EQU        15                    ; extended Roman script 
  110. langMaltese                        EQU        16                    ; extended Roman script 
  111. langTurkish                        EQU        17                    ; extended Roman script 
  112. langCroatian                    EQU        18                    ; Serbo-Croatian in extended Roman script 
  113. langTradChinese                    EQU        19                    ; Chinese in traditional characters 
  114.  
  115. langUrdu                        EQU        20                    ; smArabic script 
  116. langHindi                        EQU        21                    ; smDevanagari script 
  117. langThai                        EQU        22                    ; smThai script 
  118. langKorean                        EQU        23                    ; smKorean script 
  119. langLithuanian                    EQU        24                    ; smEastEurRoman script 
  120. langPolish                        EQU        25                    ; smEastEurRoman script 
  121. langHungarian                    EQU        26                    ; smEastEurRoman script 
  122. langEstonian                    EQU        27                    ; smEastEurRoman script 
  123. langLettish                        EQU        28                    ; smEastEurRoman script 
  124. langLatvian                        EQU        28                    ; Synonym for langLettish 
  125. langSaamisk                        EQU        29                    ; ext. Roman script, lang. of the Sami/Lapp people of Scand. 
  126. langLappish                        EQU        29                    ; Synonym for langSaamisk 
  127. langFaeroese                    EQU        30                    ; smRoman script 
  128. langFarsi                        EQU        31                    ; smArabic script 
  129. langPersian                        EQU        31                    ; Synonym for langFarsi 
  130. langRussian                        EQU        32                    ; smCyrillic script 
  131. langSimpChinese                    EQU        33                    ; Chinese in simplified characters 
  132. langFlemish                        EQU        34                    ; smRoman script 
  133. langIrish                        EQU        35                    ; smRoman script 
  134. langAlbanian                    EQU        36                    ; smRoman script 
  135.  
  136. langRomanian                    EQU        37                    ; smEastEurRoman script 
  137. langCzech                        EQU        38                    ; smEastEurRoman script 
  138. langSlovak                        EQU        39                    ; smEastEurRoman script 
  139. langSlovenian                    EQU        40                    ; smEastEurRoman script 
  140. langYiddish                        EQU        41                    ; smHebrew script 
  141. langSerbian                        EQU        42                    ; Serbo-Croatian in smCyrillic script 
  142. langMacedonian                    EQU        43                    ; smCyrillic script 
  143. langBulgarian                    EQU        44                    ; smCyrillic script 
  144. langUkrainian                    EQU        45                    ; smCyrillic script 
  145. langByelorussian                EQU        46                    ; smCyrillic script 
  146. langUzbek                        EQU        47                    ; smCyrillic script 
  147. langKazakh                        EQU        48                    ; smCyrillic script 
  148. langAzerbaijani                    EQU        49                    ; Azerbaijani in smCyrillic script (USSR) 
  149. langAzerbaijanAr                EQU        50                    ; Azerbaijani in smArabic script (Iran) 
  150. langArmenian                    EQU        51                    ; smArmenian script 
  151. langGeorgian                    EQU        52                    ; smGeorgian script 
  152. langMoldavian                    EQU        53                    ; smCyrillic script 
  153. langKirghiz                        EQU        54                    ; smCyrillic script 
  154. langTajiki                        EQU        55                    ; smCyrillic script 
  155. langTurkmen                        EQU        56                    ; smCyrillic script 
  156.  
  157. langMongolian                    EQU        57                    ; Mongolian in smMongolian script 
  158. langMongolianCyr                EQU        58                    ; Mongolian in smCyrillic script 
  159. langPashto                        EQU        59                    ; smArabic script 
  160. langKurdish                        EQU        60                    ; smArabic script 
  161. langKashmiri                    EQU        61                    ; smArabic script 
  162. langSindhi                        EQU        62                    ; smExtArabic script 
  163. langTibetan                        EQU        63                    ; smTibetan script 
  164. langNepali                        EQU        64                    ; smDevanagari script 
  165. langSanskrit                    EQU        65                    ; smDevanagari script 
  166. langMarathi                        EQU        66                    ; smDevanagari script 
  167. langBengali                        EQU        67                    ; smBengali script 
  168. langAssamese                    EQU        68                    ; smBengali script 
  169. langGujarati                    EQU        69                    ; smGujarati script 
  170. langPunjabi                        EQU        70                    ; smGurmukhi script 
  171. langOriya                        EQU        71                    ; smOriya script 
  172. langMalayalam                    EQU        72                    ; smMalayalam script 
  173. langKannada                        EQU        73                    ; smKannada script 
  174. langTamil                        EQU        74                    ; smTamil script 
  175. langTelugu                        EQU        75                    ; smTelugu script 
  176. langSinhalese                    EQU        76                    ; smSinhalese script 
  177.  
  178. langBurmese                        EQU        77                    ; smBurmese script 
  179. langKhmer                        EQU        78                    ; smKhmer script 
  180. langLao                            EQU        79                    ; smLaotian script 
  181. langVietnamese                    EQU        80                    ; smVietnamese script 
  182. langIndonesian                    EQU        81                    ; smRoman script 
  183. langTagalog                        EQU        82                    ; smRoman script 
  184. langMalayRoman                    EQU        83                    ; Malay in smRoman script 
  185. langMalayArabic                    EQU        84                    ; Malay in smArabic script 
  186. langAmharic                        EQU        85                    ; smEthiopic script 
  187. langTigrinya                    EQU        86                    ; smEthiopic script 
  188. langGalla                        EQU        87                    ; smEthiopic script 
  189. langOromo                        EQU        87                    ; Synonym for langGalla 
  190. langSomali                        EQU        88                    ; smRoman script 
  191. langSwahili                        EQU        89                    ; smRoman script 
  192. langRuanda                        EQU        90                    ; smRoman script 
  193. langRundi                        EQU        91                    ; smRoman script 
  194. langChewa                        EQU        92                    ; smRoman script 
  195. langMalagasy                    EQU        93                    ; smRoman script 
  196. langEsperanto                    EQU        94                    ; extended Roman script 
  197. langWelsh                        EQU        128                    ; smRoman script 
  198.  
  199. langBasque                        EQU        129                    ; smRoman script 
  200. langCatalan                        EQU        130                    ; smRoman script 
  201. langLatin                        EQU        131                    ; smRoman script 
  202. langQuechua                        EQU        132                    ; smRoman script 
  203. langGuarani                        EQU        133                    ; smRoman script 
  204. langAymara                        EQU        134                    ; smRoman script 
  205. langTatar                        EQU        135                    ; smCyrillic script 
  206. langUighur                        EQU        136                    ; smArabic script 
  207. langDzongkha                    EQU        137                    ; (lang of Bhutan) smTibetan script 
  208. langJavaneseRom                    EQU        138                    ; Javanese in smRoman script 
  209. langSundaneseRom                EQU        139                    ; Sundanese in smRoman script 
  210. ; Obsolete names, kept for backward compatibility 
  211. langPortugese                    EQU        8                    ; old misspelled version, kept for compatibility 
  212. langMalta                        EQU        16                    ; old misspelled version, kept for compatibility 
  213. langYugoslavian                    EQU        18                    ; (use langCroatian, langSerbian, etc.) 
  214. langChinese                        EQU        19                    ; (use langTradChinese or langSimpChinese) 
  215. langLapponian                    EQU        29                    ; Synonym for langSaamisk, not correct name 
  216.  
  217. ; Regional version codes 
  218. verUS                            EQU        0
  219. verFrance                        EQU        1
  220. verBritain                        EQU        2
  221. verGermany                        EQU        3
  222. verItaly                        EQU        4
  223. verNetherlands                    EQU        5
  224. verFrBelgiumLux                    EQU        6                    ; French for Belgium & Luxembourg 
  225. verSweden                        EQU        7
  226. verSpain                        EQU        8
  227. verDenmark                        EQU        9
  228. verPortugal                        EQU        10
  229. verFrCanada                        EQU        11
  230. verNorway                        EQU        12
  231.  
  232. verIsrael                        EQU        13
  233. verJapan                        EQU        14
  234. verAustralia                    EQU        15
  235. verArabic                        EQU        16                    ; synonym for verArabia 
  236. verFinland                        EQU        17
  237. verFrSwiss                        EQU        18                    ; French Swiss 
  238. verGrSwiss                        EQU        19                    ; German Swiss 
  239. verGreece                        EQU        20
  240. verIceland                        EQU        21
  241. verMalta                        EQU        22
  242. verCyprus                        EQU        23
  243. verTurkey                        EQU        24
  244. verYugoCroatian                    EQU        25                    ; Croatian system for Yugoslavia 
  245. verNetherlandsComma                EQU        26
  246. verBelgiumLuxPoint                EQU        27
  247. verCanadaComma                    EQU        28
  248. verCanadaPoint                    EQU        29
  249. vervariantPortugal                EQU        30
  250. vervariantNorway                EQU        31
  251. vervariantDenmark                EQU        32
  252. verIndiaHindi                    EQU        33                    ; Hindi system for India 
  253. verPakistan                        EQU        34
  254. verTurkishModified                EQU        35
  255. verGreekAncient                    EQU        40
  256. verLithuania                    EQU        41
  257. verPoland                        EQU        42
  258. verHungary                        EQU        43
  259. verEstonia                        EQU        44
  260. verLatvia                        EQU        45
  261.  
  262. verLapland                        EQU        46
  263. verFaeroeIsl                    EQU        47
  264. verIran                            EQU        48
  265. verRussia                        EQU        49
  266. verIreland                        EQU        50                    ; English-language version for Ireland 
  267. verKorea                        EQU        51
  268. verChina                        EQU        52
  269. verTaiwan                        EQU        53
  270. verThailand                        EQU        54
  271. verCzech                        EQU        56
  272. verSlovak                        EQU        57
  273. verGenericFE                    EQU        58
  274. verMagyar                        EQU        59
  275. verBengali                        EQU        60
  276. verByeloRussian                    EQU        61
  277. verUkrania                        EQU        62
  278. verItalianSwiss                    EQU        63
  279. verAlternateGr                    EQU        64
  280.  
  281. minCountry                        EQU        verUS
  282. maxCountry                        EQU        verAlternateGr        ; changed from verThailand when additional enums added 
  283.  
  284. ; Obsolete region code names, kept for backward compatibility 
  285. verBelgiumLux                    EQU        6                    ; (use verFrBelgiumLux instead, less ambiguous) 
  286. verArabia                        EQU        16
  287. verYugoslavia                    EQU        25                    ; (use verYugoCroatian instead, less ambiguous) 
  288. verIndia                        EQU        33                    ; (use verIndiaHindi instead, less ambiguous) 
  289. ; Calendar Codes 
  290. calGregorian                    EQU        0
  291. calArabicCivil                    EQU        1
  292. calArabicLunar                    EQU        2
  293. calJapanese                        EQU        3
  294. calJewish                        EQU        4
  295. calCoptic                        EQU        5
  296. calPersian                        EQU        6
  297. ; Integer Format Codes 
  298. intWestern                        EQU        0
  299. intArabic                        EQU        1
  300. intRoman                        EQU        2
  301. intJapanese                        EQU        3
  302. intEuropean                        EQU        4
  303. intOutputMask                    EQU        $8000
  304. ; CharByte byte types 
  305. smSingleByte                    EQU        0
  306. smFirstByte                        EQU        -1
  307. smLastByte                        EQU        1
  308. smMiddleByte                    EQU        2
  309. ; CharType field masks 
  310. smcTypeMask                        EQU        $000F
  311. smcReserved                        EQU        $00F0
  312.  
  313. smcClassMask                    EQU        $0F00
  314. smcOrientationMask                EQU        $1000                ;two-byte script glyph orientation
  315. smcRightMask                    EQU        $2000
  316. smcUpperMask                    EQU        $4000
  317. smcDoubleMask                    EQU        $8000
  318. ; Basic CharType character types 
  319. smCharPunct                        EQU        $0000
  320. smCharAscii                        EQU        $0001
  321. smCharEuro                        EQU        $0007
  322. smCharExtAscii                    EQU        $0007                ; More correct synonym for smCharEuro 
  323. ; Additional CharType character types for script systems 
  324. smCharKatakana                    EQU        $0002                ;Japanese Katakana
  325. smCharHiragana                    EQU        $0003                ;Japanese Hiragana
  326. smCharIdeographic                EQU        $0004                ;Hanzi, Kanji, Hanja
  327. smCharTwoByteGreek                EQU        $0005                ;2-byte Greek in Far East systems
  328. smCharTwoByteRussian            EQU        $0006                ;2-byte Cyrillic in Far East systems
  329. smCharBidirect                    EQU        $0008                ;Arabic/Hebrew
  330. smCharContextualLR                EQU        $0009                ;Contextual left-right: Thai, Indic scripts
  331. smCharNonContextualLR            EQU        $000A                ;Non-contextual left-right: Cyrillic, Greek
  332. smCharHangul                    EQU        $000C                ;Korean Hangul
  333. smCharJamo                        EQU        $000D                ;Korean Jamo
  334. smCharBopomofo                    EQU        $000E                ;Chinese Bopomofo
  335. ; old names for some of above, for backward compatibility 
  336. smCharFISKana                    EQU        $0002                ;Katakana
  337. smCharFISGana                    EQU        $0003                ;Hiragana
  338. smCharFISIdeo                    EQU        $0004                ;Hanzi, Kanji, Hanja
  339.  
  340. smCharFISGreek                    EQU        $0005                ;2-byte Greek in Far East systems
  341. smCharFISRussian                EQU        $0006                ;2-byte Cyrillic in Far East systems
  342. ; CharType classes for punctuation (smCharPunct) 
  343. smPunctNormal                    EQU        $0000
  344. smPunctNumber                    EQU        $0100
  345. smPunctSymbol                    EQU        $0200
  346. smPunctBlank                    EQU        $0300
  347. ; Additional CharType classes for punctuation in two-byte systems 
  348. smPunctRepeat                    EQU        $0400                ; repeat marker 
  349. smPunctGraphic                    EQU        $0500                ; line graphics 
  350. ; CharType Katakana and Hiragana classes for two-byte systems 
  351. smKanaSmall                        EQU        $0100                ;small kana character
  352. smKanaHardOK                    EQU        $0200                ;can have dakuten
  353. smKanaSoftOK                    EQU        $0300                ;can have dakuten or han-dakuten
  354. ; CharType Ideographic classes for two-byte systems 
  355. smIdeographicLevel1                EQU        $0000                ;level 1 char
  356. smIdeographicLevel2                EQU        $0100                ;level 2 char
  357. smIdeographicUser                EQU        $0200                ;user char
  358. ; old names for above, for backward compatibility 
  359. smFISClassLvl1                    EQU        $0000                ;level 1 char
  360. smFISClassLvl2                    EQU        $0100                ;level 2 char
  361. smFISClassUser                    EQU        $0200                ;user char
  362. ; CharType Jamo classes for Korean systems 
  363. smJamoJaeum                        EQU        $0000                ;simple consonant char
  364. smJamoBogJaeum                    EQU        $0100                ;complex consonant char
  365. smJamoMoeum                        EQU        $0200                ;simple vowel char
  366.  
  367. smJamoBogMoeum                    EQU        $0300                ;complex vowel char
  368. ; CharType glyph orientation for two-byte systems 
  369. smCharHorizontal                EQU        $0000                ; horizontal character form, or for both 
  370. smCharVertical                    EQU        $1000                ; vertical character form 
  371. ; CharType directions 
  372. smCharLeft                        EQU        $0000
  373. smCharRight                        EQU        $2000
  374. ; CharType case modifers 
  375. smCharLower                        EQU        $0000
  376. smCharUpper                        EQU        $4000
  377. ; CharType character size modifiers (1 or multiple bytes). 
  378. smChar1byte                        EQU        $0000
  379. smChar2byte                        EQU        $8000
  380. ; TransliterateText target types for Roman 
  381. smTransAscii                    EQU        0                    ;convert to ASCII
  382. smTransNative                    EQU        1                    ;convert to font script
  383. smTransCase                        EQU        $FE                    ;convert case for all text
  384. smTransSystem                    EQU        $FF                    ;convert to system script
  385. ; TransliterateText target types for two-byte scripts 
  386. smTransAscii1                    EQU        2                    ;1-byte Roman
  387. smTransAscii2                    EQU        3                    ;2-byte Roman
  388. smTransKana1                    EQU        4                    ;1-byte Japanese Katakana
  389. smTransKana2                    EQU        5                    ;2-byte Japanese Katakana
  390.  
  391. smTransGana2                    EQU        7                    ;2-byte Japanese Hiragana (no 1-byte Hiragana)
  392. smTransHangul2                    EQU        8                    ;2-byte Korean Hangul
  393. smTransJamo2                    EQU        9                    ;2-byte Korean Jamo
  394. smTransBopomofo2                EQU        10                    ;2-byte Chinese Bopomofo
  395. ; TransliterateText target modifiers 
  396. smTransLower                    EQU        $4000                ;target becomes lowercase
  397. smTransUpper                    EQU        $8000                ;target becomes uppercase
  398. ; TransliterateText resource format numbers 
  399. smTransRuleBaseFormat            EQU        1                    ;Rule based trsl resource format 
  400. smTransHangulFormat                EQU        2                    ;Table based Hangul trsl resource format
  401. ; TransliterateText property flags 
  402. smTransPreDoubleByting            EQU        1                    ;Convert all text to double byte before transliteration
  403. smTransPreLowerCasing            EQU        2                    ;Convert all text to lower case before transliteration
  404. ; TransliterateText source mask - general 
  405. smMaskAll                        EQU        $FFFFFFFF            ;Convert all text
  406. ; TransliterateText source masks 
  407. smMaskAscii                        EQU        $00000001            ;2^smTransAscii
  408. smMaskNative                    EQU        $00000002            ;2^smTransNative
  409. ; TransliterateText source masks for two-byte scripts 
  410. smMaskAscii1                    EQU        $00000004            ;2^smTransAscii1
  411. smMaskAscii2                    EQU        $00000008            ;2^smTransAscii2
  412. smMaskKana1                        EQU        $00000010            ;2^smTransKana1
  413. smMaskKana2                        EQU        $00000020            ;2^smTransKana2
  414. smMaskGana2                        EQU        $00000080            ;2^smTransGana2
  415. smMaskHangul2                    EQU        $00000100            ;2^smTransHangul2
  416. smMaskJamo2                        EQU        $00000200            ;2^smTransJamo2
  417. smMaskBopomofo2                    EQU        $00000400            ;2^smTransBopomofo2
  418.  
  419. ; Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. 
  420. smNotInstalled                    EQU        0                    ;routine not available in script
  421. smBadVerb                        EQU        -1                    ;Bad verb passed to a routine
  422. smBadScript                        EQU        -2                    ;Bad script code passed to a routine
  423.  
  424. ; Values for script redraw flag. 
  425. smRedrawChar                    EQU        0                    ;Redraw character only
  426. smRedrawWord                    EQU        1                    ;Redraw entire word (2-byte systems)
  427. smRedrawLine                    EQU        -1                    ;Redraw entire line (bidirectional systems)
  428. ; GetScriptManagerVariable and SetScriptManagerVariable verbs 
  429. smVersion                        EQU        0                    ;Script Manager version number
  430. smMunged                        EQU        2                    ;Globals change count
  431. smEnabled                        EQU        4                    ;Count of enabled scripts, incl Roman
  432. smBidirect                        EQU        6                    ;At least one bidirectional script
  433. smFontForce                        EQU        8                    ;Force font flag
  434. smIntlForce                        EQU        10                    ;Force intl flag
  435. smForced                        EQU        12                    ;Script was forced to system script
  436. smDefault                        EQU        14                    ;Script was defaulted to Roman script
  437. smPrint                            EQU        16                    ;Printer action routine
  438. smSysScript                        EQU        18                    ;System script
  439. smLastScript                    EQU        20                    ;Last keyboard script
  440. smKeyScript                        EQU        22                    ;Keyboard script
  441. smSysRef                        EQU        24                    ;System folder refNum
  442. smKeyCache                        EQU        26                    ;obsolete
  443. smKeySwap                        EQU        28                    ;Swapping table handle
  444. smGenFlags                        EQU        30                    ;General flags long
  445. smOverride                        EQU        32                    ;Script override flags
  446.  
  447. smCharPortion                    EQU        34                    ;Ch vs SpExtra proportion
  448. ; New for System 7.0: 
  449. smDoubleByte                    EQU        36                    ;Flag for double-byte script installed
  450. smKCHRCache                        EQU        38                    ;Returns pointer to KCHR cache
  451. smRegionCode                    EQU        40                    ;Returns current region code (verXxx)
  452. smKeyDisableState                EQU        42                    ;Returns current keyboard disable state
  453. ; GetScriptVariable and SetScriptVariable verbs.
  454. ;Note: Verbs private to script systems are negative, while
  455. ;those general across script systems are non-negative. 
  456. smScriptVersion                    EQU        0                    ;Script software version
  457. smScriptMunged                    EQU        2                    ;Script entry changed count
  458. smScriptEnabled                    EQU        4                    ;Script enabled flag
  459. smScriptRight                    EQU        6                    ;Right to left flag
  460. smScriptJust                    EQU        8                    ;Justification flag
  461. smScriptRedraw                    EQU        10                    ;Word redraw flag
  462. smScriptSysFond                    EQU        12                    ;Preferred system font
  463. smScriptAppFond                    EQU        14                    ;Preferred Application font
  464. smScriptBundle                    EQU        16                    ;Beginning of itlb verbs
  465. smScriptNumber                    EQU        16                    ;Script itl0 id
  466. smScriptDate                    EQU        18                    ;Script itl1 id
  467. smScriptSort                    EQU        20                    ;Script itl2 id
  468. smScriptFlags                    EQU        22                    ;flags word
  469. smScriptToken                    EQU        24                    ;Script itl4 id
  470. smScriptEncoding                EQU        26                    ;id of optional itl5, if present
  471. smScriptLang                    EQU        28                    ;Current language for script
  472.  
  473. smScriptNumDate                    EQU        30                    ;Script Number/Date formats.
  474. smScriptKeys                    EQU        32                    ;Script KCHR id
  475. smScriptIcon                    EQU        34                    ;ID # of SICN or kcs#/kcs4/kcs8 suite
  476. smScriptPrint                    EQU        36                    ;Script printer action routine
  477. smScriptTrap                    EQU        38                    ;Trap entry pointer
  478. smScriptCreator                    EQU        40                    ;Script file creator
  479. smScriptFile                    EQU        42                    ;Script file name
  480. smScriptName                    EQU        44                    ;Script name
  481. ; There is a hole here for old Kanji private verbs 46-76 
  482. ;
  483. ; New for System 7.0: 
  484. smScriptMonoFondSize            EQU        78                    ;default monospace FOND (hi) & size (lo)
  485. smScriptPrefFondSize            EQU        80                    ;preferred FOND (hi) & size (lo)
  486. smScriptSmallFondSize            EQU        82                    ;default small FOND (hi) & size (lo)
  487. smScriptSysFondSize                EQU        84                    ;default system FOND (hi) & size (lo)
  488. smScriptAppFondSize                EQU        86                    ;default app FOND (hi) & size (lo)
  489. smScriptHelpFondSize            EQU        88                    ;default Help Mgr FOND (hi) & size (lo)
  490. smScriptValidStyles                EQU        90                    ;mask of valid styles for script
  491. smScriptAliasStyle                EQU        92                    ;style (set) to use for aliases
  492. ; Special script code values for International Utilities 
  493. iuSystemScript                    EQU        -1                    ; <obsolete>  system script 
  494. iuCurrentScript                    EQU        -2                    ; <obsolete>  current script (for font of grafPort) 
  495. ; Negative verbs for KeyScript 
  496. smKeyNextScript                    EQU        -1                    ; Switch to next available script 
  497. smKeySysScript                    EQU        -2                    ; Switch to the system script 
  498. smKeySwapScript                    EQU        -3                    ; Switch to previously-used script 
  499. ; New for System 7.0: 
  500. smKeyNextKybd                    EQU        -4                    ; Switch to next keyboard in current keyscript 
  501.  
  502. smKeySwapKybd                    EQU        -5                    ; Switch to previously-used keyboard in current keyscript 
  503. smKeyDisableKybds                EQU        -6                    ; Disable keyboards not in system or Roman script 
  504. smKeyEnableKybds                EQU        -7                    ; Re-enable keyboards for all enabled scripts 
  505. smKeyToggleInline                EQU        -8                    ; Toggle inline input for current keyscript 
  506. smKeyToggleDirection            EQU        -9                    ; Toggle default line direction (TESysJust) 
  507. smKeyNextInputMethod            EQU        -10                    ; Switch to next input method in current keyscript 
  508. smKeySwapInputMethod            EQU        -11                    ; Switch to last-used input method in current keyscript 
  509. smKeyDisableKybdSwitch            EQU        -12                    ; Disable switching from the current keyboard 
  510. smKeySetDirLeftRight            EQU        -15                    ; Set default line dir to left-right, align left 
  511. smKeySetDirRightLeft            EQU        -16                    ; Set default line dir to right-left, align right 
  512. smKeyRoman                        EQU        -17                    ; Set keyscript to Roman. Does nothing if Roman-only
  513. ;                                        system, unlike KeyScript(smRoman) which forces
  514. ;                                        an update to current default Roman keyboard 
  515. ; Bits in the smScriptFlags word
  516. ;(bits above 8 are non-static) 
  517. smsfIntellCP                    EQU        0                    ;Script has intelligent cut & paste
  518. smsfSingByte                    EQU        1                    ;Script has only single bytes
  519. smsfNatCase                        EQU        2                    ;Native chars have upper & lower case
  520. smsfContext                        EQU        3                    ;Script is contextual
  521. smsfNoForceFont                    EQU        4                    ;Script will not force characters
  522. smsfB0Digits                    EQU        5                    ;Script has alternate digits at B0-B9
  523. smsfAutoInit                    EQU        6                    ;Auto initialize the script
  524. smsfUnivExt                        EQU        7                    ;Script is handled by universal extension
  525. smsfSynchUnstyledTE                EQU        8                    ;Script synchronizes for unstyled TE
  526. smsfForms                        EQU        13                    ;Uses contextual forms for letters
  527. smsfLigatures                    EQU        14                    ;Uses contextual ligatures
  528. smsfReverse                        EQU        15                    ;Reverses native text, right-left
  529. ; Bits in the smGenFlags long.
  530. ;First (high-order) byte is set from itlc flags byte. 
  531. smfShowIcon                        EQU        31                    ;Show icon even if only one script
  532. smfDualCaret                    EQU        30                    ;Use dual caret for mixed direction text
  533. smfNameTagEnab                    EQU        29                    ;Reserved for internal use
  534. smfUseAssocFontInfo                EQU        28                    ;Use the associated font info for FontMetrics calls <48>
  535.  
  536. ; Roman script constants 
  537. ; The following are here for backward compatibility, but should not be used. 
  538. ; This information should be obtained using GetScript. 
  539. romanSysFond                    EQU        $3FFF                ;system font id number
  540. romanAppFond                    EQU        3                    ;application font id number
  541. romanFlags                        EQU        $0007                ;roman settings
  542. ; Script Manager font equates. 
  543. smFondStart                        EQU        $4000                ;start from 16K
  544. smFondEnd                        EQU        $C000                ;past end of range at 48K
  545. ; Miscellaneous font equates. 
  546. smUprHalfCharSet                EQU        $80                    ;first char code in top half of std char set
  547. ; Character Set Extensions 
  548. diaeresisUprY                    EQU        $D9
  549. fraction                        EQU        $DA
  550. intlCurrency                    EQU        $DB
  551. leftSingGuillemet                EQU        $DC
  552. rightSingGuillemet                EQU        $DD
  553. fiLigature                        EQU        $DE
  554. flLigature                        EQU        $DF
  555. dblDagger                        EQU        $E0
  556. centeredDot                        EQU        $E1
  557. baseSingQuote                    EQU        $E2
  558. baseDblQuote                    EQU        $E3
  559. perThousand                        EQU        $E4
  560. circumflexUprA                    EQU        $E5
  561.  
  562. circumflexUprE                    EQU        $E6
  563. acuteUprA                        EQU        $E7
  564. diaeresisUprE                    EQU        $E8
  565. graveUprE                        EQU        $E9
  566. acuteUprI                        EQU        $EA
  567. circumflexUprI                    EQU        $EB
  568. diaeresisUprI                    EQU        $EC
  569. graveUprI                        EQU        $ED
  570. acuteUprO                        EQU        $EE
  571. circumflexUprO                    EQU        $EF
  572. appleLogo                        EQU        $F0
  573. graveUprO                        EQU        $F1
  574. acuteUprU                        EQU        $F2
  575. circumflexUprU                    EQU        $F3
  576. graveUprU                        EQU        $F4
  577. dotlessLwrI                        EQU        $F5
  578. circumflex                        EQU        $F6
  579. tilde                            EQU        $F7
  580. macron                            EQU        $F8
  581. breveMark                        EQU        $F9
  582.  
  583. overDot                            EQU        $FA
  584. ringMark                        EQU        $FB
  585. cedilla                            EQU        $FC
  586. doubleAcute                        EQU        $FD
  587. ogonek                            EQU        $FE
  588. hachek                            EQU        $FF
  589. ; TokenType values 
  590. tokenIntl                        EQU        4                    ;the itl resource number of the tokenizer
  591. tokenEmpty                        EQU        -1                    ;used internally as an empty flag
  592.  
  593. tokenUnknown                    EQU        0                    ;chars that do not match a defined token type
  594. tokenWhite                        EQU        1                    ;white space
  595. tokenLeftLit                    EQU        2                    ;literal begin
  596. tokenRightLit                    EQU        3                    ;literal end
  597. tokenAlpha                        EQU        4                    ;alphabetic
  598. tokenNumeric                    EQU        5                    ;numeric
  599. tokenNewLine                    EQU        6                    ;new line
  600. tokenLeftComment                EQU        7                    ;open comment
  601. tokenRightComment                EQU        8                    ;close comment
  602. tokenLiteral                    EQU        9                    ;literal
  603. tokenEscape                        EQU        10                    ;character escape (e.g. '\' in "\n", "\t")
  604. tokenAltNum                        EQU        11                    ;alternate number (e.g. $B0-B9 in Arabic,Hebrew)
  605. tokenRealNum                    EQU        12                    ;real number
  606. tokenAltReal                    EQU        13                    ;alternate real number
  607. tokenReserve1                    EQU        14                    ;reserved
  608. tokenReserve2                    EQU        15                    ;reserved
  609. tokenLeftParen                    EQU        16                    ;open parenthesis
  610. tokenRightParen                    EQU        17                    ;close parenthesis
  611. tokenLeftBracket                EQU        18                    ;open square bracket
  612. tokenRightBracket                EQU        19                    ;close square bracket
  613.  
  614. tokenLeftCurly                    EQU        20                    ;open curly bracket
  615. tokenRightCurly                    EQU        21                    ;close curly bracket
  616. tokenLeftEnclose                EQU        22                    ;open guillemet
  617. tokenRightEnclose                EQU        23                    ;close guillemet
  618. tokenPlus                        EQU        24
  619. tokenMinus                        EQU        25
  620. tokenAsterisk                    EQU        26                    ;times/multiply
  621. tokenDivide                        EQU        27
  622. tokenPlusMinus                    EQU        28                    ;plus or minus symbol
  623. tokenSlash                        EQU        29
  624. tokenBackSlash                    EQU        30
  625. tokenLess                        EQU        31                    ;less than symbol
  626. tokenGreat                        EQU        32                    ;greater than symbol
  627. tokenEqual                        EQU        33
  628. tokenLessEqual2                    EQU        34                    ;less than or equal, 2 characters (e.g. <=)
  629. tokenLessEqual1                    EQU        35                    ;less than or equal, 1 character
  630. tokenGreatEqual2                EQU        36                    ;greater than or equal, 2 characters (e.g. >=)
  631. tokenGreatEqual1                EQU        37                    ;greater than or equal, 1 character
  632. token2Equal                        EQU        38                    ;double equal (e.g. ==)
  633. tokenColonEqual                    EQU        39                    ;colon equal
  634.  
  635. tokenNotEqual                    EQU        40                    ;not equal, 1 character
  636. tokenLessGreat                    EQU        41                    ;less/greater, Pascal not equal (e.g. <>)
  637. tokenExclamEqual                EQU        42                    ;exclamation equal, C not equal (e.g. !=)
  638. tokenExclam                        EQU        43                    ;exclamation point
  639. tokenTilde                        EQU        44                    ;centered tilde
  640. tokenComma                        EQU        45
  641. tokenPeriod                        EQU        46
  642. tokenLeft2Quote                    EQU        47                    ;open double quote
  643. tokenRight2Quote                EQU        48                    ;close double quote
  644. tokenLeft1Quote                    EQU        49                    ;open single quote
  645. tokenRight1Quote                EQU        50                    ;close single quote
  646. token2Quote                        EQU        51                    ;double quote
  647. token1Quote                        EQU        52                    ;single quote
  648. tokenSemicolon                    EQU        53
  649. tokenPercent                    EQU        54
  650. tokenCaret                        EQU        55
  651. tokenUnderline                    EQU        56
  652. tokenAmpersand                    EQU        57
  653. tokenAtSign                        EQU        58
  654. tokenBar                        EQU        59                    ;vertical bar
  655.  
  656. tokenQuestion                    EQU        60
  657. tokenPi                            EQU        61                    ;lower-case pi
  658. tokenRoot                        EQU        62                    ;square root symbol
  659. tokenSigma                        EQU        63                    ;capital sigma
  660. tokenIntegral                    EQU        64                    ;integral sign
  661. tokenMicro                        EQU        65
  662. tokenCapPi                        EQU        66                    ;capital pi
  663. tokenInfinity                    EQU        67
  664. tokenColon                        EQU        68
  665. tokenHash                        EQU        69                    ;e.g. #
  666. tokenDollar                        EQU        70
  667. tokenNoBreakSpace                EQU        71                    ;non-breaking space
  668. tokenFraction                    EQU        72
  669. tokenIntlCurrency                EQU        73
  670. tokenLeftSingGuillemet            EQU        74
  671. tokenRightSingGuillemet            EQU        75
  672. tokenPerThousand                EQU        76
  673. tokenEllipsis                    EQU        77
  674. tokenCenterDot                    EQU        78
  675. tokenNil                        EQU        127
  676.  
  677. delimPad                        EQU        -2
  678. ; obsolete, misspelled token names kept for backward compatibility 
  679. tokenTilda                        EQU        44
  680. tokenCarat                        EQU        55
  681.  
  682. ; Table selectors for GetItlTable 
  683. smWordSelectTable                EQU        0                    ; get word select break table from 'itl2' 
  684. smWordWrapTable                    EQU        1                    ; get word wrap break table from 'itl2' 
  685. smNumberPartsTable                EQU        2                    ; get default number parts table from 'itl4' 
  686. smUnTokenTable                    EQU        3                    ; get unToken table from 'itl4' 
  687. smWhiteSpaceList                EQU        4                    ; get white space list from 'itl4' 
  688. iuWordSelectTable                EQU        0                    ; <obsolete>  get word select break table from 'itl2' 
  689. iuWordWrapTable                    EQU        1                    ; <obsolete>  get word wrap break table from 'itl2' 
  690. iuNumberPartsTable                EQU        2                    ; <obsolete>  get default number parts table from 'itl4' 
  691. iuUnTokenTable                    EQU        3                    ; <obsolete>  get unToken table from 'itl4' 
  692. iuWhiteSpaceList                EQU        4                    ; <obsolete>  get white space list from 'itl4' 
  693.  
  694. ; end of stuff moved from Packages.h 
  695. tokenOK                            EQU        0                    ; TokenResults 
  696. tokenOverflow                    EQU        1                    ; TokenResults 
  697. stringOverflow                    EQU        2                    ; TokenResults 
  698. badDelim                        EQU        3                    ; TokenResults 
  699. badEnding                        EQU        4                    ; TokenResults 
  700. crash                            EQU        5                    ; TokenResults 
  701.  
  702. ; typedef SInt8             TokenResults
  703. ; typedef char                 CharByteTable[256]
  704. ; typedef short             TokenType
  705. ; typedef TokenType         DelimType[2]
  706. ; typedef TokenType         CommentType[4]
  707. TokenRec                 RECORD    0
  708. theToken                 ds.w   1        ; offset: $0 (0)
  709. position                 ds.l   1        ; offset: $2 (2)        ;pointer into original source
  710. length                     ds.l   1        ; offset: $6 (6)        ;length of text in original source
  711. stringPosition             ds.l   1        ; offset: $A (10)        ;Pascal/C string copy of identifier
  712. sizeof                     EQU *            ; size:   $E (14)
  713.                         ENDR
  714.  
  715. ; typedef struct TokenRec     TokenRec
  716. ; typedef TokenRec             *TokenRecPtr
  717. TokenBlock                 RECORD    0
  718. source                     ds.l   1        ; offset: $0 (0)        ;pointer to stream of characters
  719. sourceLength             ds.l   1        ; offset: $4 (4)        ;length of source stream
  720. tokenList                 ds.l   1        ; offset: $8 (8)        ;pointer to array of tokens
  721. tokenLength                 ds.l   1        ; offset: $C (12)        ;maximum length of TokenList
  722. tokenCount                 ds.l   1        ; offset: $10 (16)        ;number tokens generated by tokenizer
  723. stringList                 ds.l   1        ; offset: $14 (20)        ;pointer to stream of identifiers
  724. stringLength             ds.l   1        ; offset: $18 (24)        ;length of string list
  725. stringCount                 ds.l   1        ; offset: $1C (28)        ;number of bytes currently used
  726. doString                 ds.b   1        ; offset: $20 (32)        ;make strings & put into StringList
  727. doAppend                 ds.b   1        ; offset: $21 (33)        ;append to TokenList rather than replace
  728. doAlphanumeric             ds.b   1        ; offset: $22 (34)        ;identifiers may include numeric
  729. doNest                     ds.b   1        ; offset: $23 (35)        ;do comments nest?
  730. leftDelims                 ds.w   2        ; offset: $24 (36)
  731. rightDelims                 ds.w   2        ; offset: $28 (40)
  732. leftComment                 ds.w   4        ; offset: $2C (44)
  733. rightComment             ds.w   4        ; offset: $34 (52)
  734. escapeCode                 ds.w   1        ; offset: $3C (60)        ;escape symbol code
  735. decimalCode                 ds.w   1        ; offset: $3E (62)
  736. itlResource                 ds.l   1        ; offset: $40 (64)        ;handle to itl4 resource of current script
  737. reserved                 ds.l   8        ; offset: $44 (68)        ;must be zero!
  738. sizeof                     EQU *            ; size:   $64 (100)
  739.                         ENDR
  740.  
  741. ; typedef struct TokenBlock  TokenBlock
  742. ; typedef TokenBlock         *TokenBlockPtr
  743. ;
  744. ; pascal short GetSysDirection(void)
  745. ;
  746.     IF ¬ GENERATINGCFM THEN
  747.         Macro
  748.         GetSysDirection      &dest=(sp)
  749.         move.w               $0BAC,&dest
  750.         EndM
  751.     ELSE
  752.         IMPORT_CFM_FUNCTION    GetSysDirection
  753.     ENDIF
  754.  
  755. ;
  756. ; pascal void SetSysDirection(short value)
  757. ;
  758.     IF ¬ GENERATINGCFM THEN
  759.         Macro
  760.         SetSysDirection      &src=(sp)+
  761.         move.w               &src,$0BAC
  762.         EndM
  763.     ELSE
  764.         IMPORT_CFM_FUNCTION    SetSysDirection
  765.     ENDIF
  766.  
  767. ;
  768. ; pascal short FontScript(void)
  769. ;
  770.     IF ¬ GENERATINGCFM THEN
  771.         Macro
  772.         _FontScript
  773.             dc.w     $2F3C
  774.             dc.w     $8200
  775.             dc.w     $0000
  776.             dc.w     $A8B5
  777.         EndM
  778.     ELSE
  779.         IMPORT_CFM_FUNCTION    FontScript
  780.     ENDIF
  781.  
  782. ;
  783. ; pascal short IntlScript(void)
  784. ;
  785.     IF ¬ GENERATINGCFM THEN
  786.         Macro
  787.         _IntlScript
  788.             dc.w     $2F3C
  789.             dc.w     $8200
  790.             dc.w     $0002
  791.             dc.w     $A8B5
  792.         EndM
  793.     ELSE
  794.         IMPORT_CFM_FUNCTION    IntlScript
  795.     ENDIF
  796.  
  797. ;
  798. ; pascal void KeyScript(short code)
  799. ;
  800.     IF ¬ GENERATINGCFM THEN
  801.         Macro
  802.         _KeyScript
  803.             dc.w     $2F3C
  804.             dc.w     $8002
  805.             dc.w     $0004
  806.             dc.w     $A8B5
  807.         EndM
  808.     ELSE
  809.         IMPORT_CFM_FUNCTION    KeyScript
  810.     ENDIF
  811.  
  812. ;
  813. ; pascal short CharByte(Ptr textBuf, short textOffset)
  814. ;
  815.     IF ¬ GENERATINGCFM THEN
  816.         Macro
  817.         _CharByte
  818.             dc.w     $2F3C
  819.             dc.w     $8206
  820.             dc.w     $0010
  821.             dc.w     $A8B5
  822.         EndM
  823.     ELSE
  824.         IMPORT_CFM_FUNCTION    CharByte
  825.     ENDIF
  826.  
  827. ;
  828. ; pascal short CharType(Ptr textBuf, short textOffset)
  829. ;
  830.     IF ¬ GENERATINGCFM THEN
  831.         Macro
  832.         _CharType
  833.             dc.w     $2F3C
  834.             dc.w     $8206
  835.             dc.w     $0012
  836.             dc.w     $A8B5
  837.         EndM
  838.     ELSE
  839.         IMPORT_CFM_FUNCTION    CharType
  840.     ENDIF
  841.  
  842. ;
  843. ; pascal Boolean IsCmdChar(const EventRecord *event, short test)
  844. ;
  845.     IF ¬ GENERATINGCFM THEN
  846.         Macro
  847.         _IsCmdChar
  848.             dc.w     $2F3C
  849.             dc.w     $8206
  850.             dc.w     $FFD0
  851.             dc.w     $A8B5
  852.         EndM
  853.     ELSE
  854.         IMPORT_CFM_FUNCTION    IsCmdChar
  855.     ENDIF
  856.  
  857. ;
  858. ; pascal OSErr Transliterate(Handle srcHandle, Handle dstHandle, short target, long srcMask)
  859. ;
  860.     IF ¬ GENERATINGCFM THEN
  861.         Macro
  862.         _Transliterate
  863.             dc.w     $2F3C
  864.             dc.w     $820E
  865.             dc.w     $0018
  866.             dc.w     $A8B5
  867.         EndM
  868.     ELSE
  869.         IMPORT_CFM_FUNCTION    Transliterate
  870.     ENDIF
  871.  
  872. ;
  873. ; pascal Boolean ParseTable(CharByteTable table)
  874. ;
  875.     IF ¬ GENERATINGCFM THEN
  876.         Macro
  877.         _ParseTable
  878.             dc.w     $2F3C
  879.             dc.w     $8204
  880.             dc.w     $0022
  881.             dc.w     $A8B5
  882.         EndM
  883.     ELSE
  884.         IMPORT_CFM_FUNCTION    ParseTable
  885.     ENDIF
  886.  
  887. ;
  888. ; pascal TokenResults IntlTokenize(TokenBlockPtr tokenParam)
  889. ;
  890.     IF ¬ GENERATINGCFM THEN
  891.         Macro
  892.         _IntlTokenize
  893.             dc.w     $2F3C
  894.             dc.w     $8204
  895.             dc.w     $FFFA
  896.             dc.w     $A8B5
  897.         EndM
  898.     ELSE
  899.         IMPORT_CFM_FUNCTION    IntlTokenize
  900.     ENDIF
  901.  
  902. ;
  903. ; pascal short FontToScript(short fontNumber)
  904. ;
  905.     IF ¬ GENERATINGCFM THEN
  906.         Macro
  907.         _FontToScript
  908.             dc.w     $2F3C
  909.             dc.w     $8202
  910.             dc.w     $0006
  911.             dc.w     $A8B5
  912.         EndM
  913.     ELSE
  914.         IMPORT_CFM_FUNCTION    FontToScript
  915.     ENDIF
  916.  
  917. ;
  918. ; pascal long GetScriptManagerVariable(short selector)
  919. ;
  920.     IF ¬ GENERATINGCFM THEN
  921.         Macro
  922.         _GetScriptManagerVariable
  923.             dc.w     $2F3C
  924.             dc.w     $8402
  925.             dc.w     $0008
  926.             dc.w     $A8B5
  927.         EndM
  928.     ELSE
  929.         IMPORT_CFM_FUNCTION    GetScriptManagerVariable
  930.     ENDIF
  931.  
  932. ;
  933. ; pascal OSErr SetScriptManagerVariable(short selector, long param)
  934. ;
  935.     IF ¬ GENERATINGCFM THEN
  936.         Macro
  937.         _SetScriptManagerVariable
  938.             dc.w     $2F3C
  939.             dc.w     $8206
  940.             dc.w     $000A
  941.             dc.w     $A8B5
  942.         EndM
  943.     ELSE
  944.         IMPORT_CFM_FUNCTION    SetScriptManagerVariable
  945.     ENDIF
  946.  
  947. ;
  948. ; pascal long GetScriptVariable(short script, short selector)
  949. ;
  950.     IF ¬ GENERATINGCFM THEN
  951.         Macro
  952.         _GetScriptVariable
  953.             dc.w     $2F3C
  954.             dc.w     $8404
  955.             dc.w     $000C
  956.             dc.w     $A8B5
  957.         EndM
  958.     ELSE
  959.         IMPORT_CFM_FUNCTION    GetScriptVariable
  960.     ENDIF
  961.  
  962. ;
  963. ; pascal OSErr SetScriptVariable(short script, short selector, long param)
  964. ;
  965.     IF ¬ GENERATINGCFM THEN
  966.         Macro
  967.         _SetScriptVariable
  968.             dc.w     $2F3C
  969.             dc.w     $8208
  970.             dc.w     $000E
  971.             dc.w     $A8B5
  972.         EndM
  973.     ELSE
  974.         IMPORT_CFM_FUNCTION    SetScriptVariable
  975.     ENDIF
  976.  
  977. ;  New for 7.1  
  978. ;
  979. ; pascal UniversalProcPtr GetScriptUtilityAddress(short selector, Boolean Before, ScriptCode script)
  980. ;
  981.     IF ¬ GENERATINGCFM THEN
  982.         Macro
  983.         _GetScriptUtilityAddress
  984.             dc.w     $2F3C
  985.             dc.w     $C404
  986.             dc.w     $0038
  987.             dc.w     $A8B5
  988.         EndM
  989.     ELSE
  990.         IMPORT_CFM_FUNCTION    GetScriptUtilityAddress
  991.     ENDIF
  992.  
  993. ;
  994. ; pascal void SetScriptUtilityAddress(short selector, Boolean Before, UniversalProcPtr routineAddr, ScriptCode script)
  995. ;
  996.     IF ¬ GENERATINGCFM THEN
  997.         Macro
  998.         _SetScriptUtilityAddress
  999.             dc.w     $2F3C
  1000.             dc.w     $C008
  1001.             dc.w     $003A
  1002.             dc.w     $A8B5
  1003.         EndM
  1004.     ELSE
  1005.         IMPORT_CFM_FUNCTION    SetScriptUtilityAddress
  1006.     ENDIF
  1007.  
  1008. ;
  1009. ; pascal UniversalProcPtr GetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, ScriptCode script)
  1010. ;
  1011.     IF ¬ GENERATINGCFM THEN
  1012.         Macro
  1013.         _GetScriptQDPatchAddress
  1014.             dc.w     $2F3C
  1015.             dc.w     $C406
  1016.             dc.w     $003C
  1017.             dc.w     $A8B5
  1018.         EndM
  1019.     ELSE
  1020.         IMPORT_CFM_FUNCTION    GetScriptQDPatchAddress
  1021.     ENDIF
  1022.  
  1023. ;
  1024. ; pascal void SetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, UniversalProcPtr routineAddr, ScriptCode script)
  1025. ;
  1026.     IF ¬ GENERATINGCFM THEN
  1027.         Macro
  1028.         _SetScriptQDPatchAddress
  1029.             dc.w     $2F3C
  1030.             dc.w     $C00A
  1031.             dc.w     $003E
  1032.             dc.w     $A8B5
  1033.         EndM
  1034.     ELSE
  1035.         IMPORT_CFM_FUNCTION    SetScriptQDPatchAddress
  1036.     ENDIF
  1037.  
  1038. ;
  1039. ; pascal short CharacterByteType(Ptr textBuf, short textOffset, ScriptCode script)
  1040. ;
  1041.     IF ¬ GENERATINGCFM THEN
  1042.         Macro
  1043.         _CharacterByteType
  1044.             dc.w     $2F3C
  1045.             dc.w     $C206
  1046.             dc.w     $0010
  1047.             dc.w     $A8B5
  1048.         EndM
  1049.     ELSE
  1050.         IMPORT_CFM_FUNCTION    CharacterByteType
  1051.     ENDIF
  1052.  
  1053. ;
  1054. ; pascal short CharacterType(Ptr textBuf, short textOffset, ScriptCode script)
  1055. ;
  1056.     IF ¬ GENERATINGCFM THEN
  1057.         Macro
  1058.         _CharacterType
  1059.             dc.w     $2F3C
  1060.             dc.w     $C206
  1061.             dc.w     $0012
  1062.             dc.w     $A8B5
  1063.         EndM
  1064.     ELSE
  1065.         IMPORT_CFM_FUNCTION    CharacterType
  1066.     ENDIF
  1067.  
  1068. ;
  1069. ; pascal OSErr TransliterateText(Handle srcHandle, Handle dstHandle, short target, long srcMask, ScriptCode script)
  1070. ;
  1071.     IF ¬ GENERATINGCFM THEN
  1072.         Macro
  1073.         _TransliterateText
  1074.             dc.w     $2F3C
  1075.             dc.w     $C20E
  1076.             dc.w     $0018
  1077.             dc.w     $A8B5
  1078.         EndM
  1079.     ELSE
  1080.         IMPORT_CFM_FUNCTION    TransliterateText
  1081.     ENDIF
  1082.  
  1083. ;
  1084. ; pascal Boolean FillParseTable(CharByteTable table, ScriptCode script)
  1085. ;
  1086.     IF ¬ GENERATINGCFM THEN
  1087.         Macro
  1088.         _FillParseTable
  1089.             dc.w     $2F3C
  1090.             dc.w     $C204
  1091.             dc.w     $0022
  1092.             dc.w     $A8B5
  1093.         EndM
  1094.     ELSE
  1095.         IMPORT_CFM_FUNCTION    FillParseTable
  1096.     ENDIF
  1097.  
  1098. ; Moved from Packages.h 
  1099. ;
  1100. ; pascal Handle GetIntlResource(short theID)
  1101. ;
  1102.     IF ¬ GENERATINGCFM THEN
  1103.         Macro
  1104.         _GetIntlResource
  1105.             move.w    #$0006,-(sp)
  1106.             dc.w     $A9ED
  1107.         EndM
  1108.     ELSE
  1109.         IMPORT_CFM_FUNCTION    GetIntlResource
  1110.     ENDIF
  1111.  
  1112. ;
  1113. ; pascal void SetIntlResource(short refNum, short theID, Handle intlHandle)
  1114. ;
  1115.     IF ¬ GENERATINGCFM THEN
  1116.         Macro
  1117.         _SetIntlResource
  1118.             move.w    #$0008,-(sp)
  1119.             dc.w     $A9ED
  1120.         EndM
  1121.     ELSE
  1122.         IMPORT_CFM_FUNCTION    SetIntlResource
  1123.     ENDIF
  1124.  
  1125. ;
  1126. ; pascal void ClearIntlResourceCache(void)
  1127. ;
  1128.     IF ¬ GENERATINGCFM THEN
  1129.         Macro
  1130.         _ClearIntlResourceCache
  1131.             move.w    #$0018,-(sp)
  1132.             dc.w     $A9ED
  1133.         EndM
  1134.     ELSE
  1135.         IMPORT_CFM_FUNCTION    ClearIntlResourceCache
  1136.     ENDIF
  1137.  
  1138. ;
  1139. ; pascal void GetIntlResourceTable(ScriptCode script, short tableCode, Handle *itlHandle, long *offset, long *length)
  1140. ;
  1141.     IF ¬ GENERATINGCFM THEN
  1142.         Macro
  1143.         _GetIntlResourceTable
  1144.             move.w    #$0024,-(sp)
  1145.             dc.w     $A9ED
  1146.         EndM
  1147.     ELSE
  1148.         IMPORT_CFM_FUNCTION    GetIntlResourceTable
  1149.     ENDIF
  1150.  
  1151.     IF OLDROUTINENAMES  THEN
  1152.     ENDIF
  1153.     ENDIF ; __SCRIPT__
  1154.